package spring.ai_chat.Web.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;

//发送消息的格式
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MsgInfo {
    Integer id;
    //类型
    String type;
    //这个会话的id 唯一的
    Integer sessionId;
    //发消息的人
    Integer userId;
    //发消息的名字
    String userName;
    //内容
    String content;

    public MsgInfo(MsgInfo msgInfo) {
        this.id = msgInfo.getId();
        this.type = msgInfo.getType();
        this.sessionId = msgInfo.getSessionId();
        this.userId = msgInfo.getUserId();
        this.userName = msgInfo.getUserName();
        this.content = msgInfo.getContent();
    }

}
